<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Thanh Toán</title>
<link href="styles.css" rel="stylesheet" type="text/css">
<script src="js/jquery.js"></script>
<script type="text/javascript">
    function validateForm() {
        var dienthoai = document.forms["myForm"]["dienthoai"].value;
        var kiemTraDT = isNaN(dienthoai);
        if (kiemTraDT == true) {
            alert("Điện thoại phải để ở định dạng số");
            return false;
        }
    }
</script>
</head>
<body>
<form class="tknc" id="tanghang2">
	<div class="login-header">
			<span>Thanh Toán</span>
			<a href="#" class="close">x</a>
	</div>
	<div class="login-content">
	<label><a href ="saveorder">Dùng địa chỉ của tôi</a></label><br>
	<label><a href="#" class="tanghang-button">Tặng hàng cho ngừời khác</a></label>
	</div>
</form>
	<div id="overlay1" class="overlay"></div>
	<form class="tknc" id="dm1" method = "post" action="tanghang" name="myForm" onsubmit="return validateForm()">
	<div class="login-header">
			<span>Tặng Hàng</span>
			<a href="#" class="close">x</a>
	</div>
	<div class="login-content">
	<label for="hoten"> Họ tên người nhận hàng : </label>
	<input type =text name = tennguoinhanhang required>
	<label for="ngaysinh">Ngày sinh : </label>
	<input type = text name = ngaysinh required>
	<label for="dienthoai">Điện thoại : </label>
	<input type = text name = dienthoai required>
	<label for="diachi">Địa chỉ : </label>
	<input type = text name = diachi required>
	<input type = submit value = "OK">
	</div>
	</form>
	<script>

	(function($){

	var overlay = $('.overlay');
	var login = $('.tknc');
	var body = $('body');
	$('.tanghang-button').click(function(e){
		e.preventDefault();
		body.css({'overflow':'hidden'});
		overlay.fadeIn(500,function(){
			login.fadeIn(500);
		})
	});

	$('.close').click(function(e){
		e.preventDefault();
		login.fadeOut(500,function(){
			overlay.fadeOut(500);
			body.css({'overflow':'visible'});
		})
	})
	})(jQuery);

	</script>
</body>
</html>